import type { Metadata, Viewport } from "next";
import "./globals.css";
import PWAWrapper from "@/components/PWAWrapper";
import ThemeProvider from "@/components/ThemeProvider";

export const metadata: Metadata = {
  title: "VIP视频解析",
  description: "一站式VIP视频解析平台",
  manifest: "/manifest.json",
  appleWebApp: {
    capable: true,
    statusBarStyle: "default",
    title: "VIP视频解析"
  }
};

export const viewport: Viewport = {
  width: "device-width",
  initialScale: 1,
  maximumScale: 1,
  themeColor: "#000000"
};

export default function RootLayout({
  children,
}: Readonly<{
  children: React.ReactNode;
}>) {
  return (
    <html lang="zh-CN" className="h-full" suppressHydrationWarning>
      <head>
        <link rel="icon" href="/icons/icon-192x192.png" />
        <link rel="apple-touch-icon" href="/icons/icon-192x192.png" />
        <meta name="apple-mobile-web-app-capable" content="yes" />
        <meta name="apple-mobile-web-app-status-bar-style" content="default" />
      </head>
      <body className="h-full">
        <PWAWrapper />
        <ThemeProvider>
          {children}
        </ThemeProvider>
      </body>
    </html>
  );
}
